/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f7fa;
    margin: 0;
    padding: 0;
}

/* 登录页面样式 */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 30px;
    width: 350px;
    text-align: center;
}

.login-card h2 {
    color: #333;
    margin-bottom: 25px;
    font-size: 24px;
}

.login-card .form-group {
    margin-bottom: 20px;
    text-align: left;
}

.login-card label {
    display: block;
    margin-bottom: 5px;
    color: #555;
    font-weight: 500;
}

.login-card input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    box-sizing: border-box;
}

.login-card button {
    width: 100%;
    padding: 12px;
    background-color: #4a6cf7;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-top: 10px;
}

.login-card button:hover {
    background-color: #3a5bd7;
}

/* 主容器样式 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部样式 */
header {
    background-color: #2c3e50;
    color: white;
    padding: 30px 0;
    text-align: center;
    border-radius: 8px;
    margin-bottom: 30px;
}

header h1 {
    font-size: 2.5em;
    font-weight: 300;
}

/* 导航样式 */
nav {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    flex: 1;
}

nav ul li a {
    display: block;
    padding: 15px 20px;
    text-align: center;
    color: #34495e;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

nav ul li a:hover {
    background-color: #3498db;
    color: white;
}

/* 主内容区域 */
main {
    min-height: 600px;
}

section h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-weight: 400;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
}

/* 卡片样式 */
.card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 25px;
    margin-bottom: 30px;
}

.card h3 {
    color: #34495e;
    margin-bottom: 20px;
    font-weight: 500;
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-group label {
    display: inline-block;
    color: #555;
    font-weight: 500;
    min-width: 100px;
    text-align: right;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group input[type="date"],
.form-group input[type="tel"],
.form-group select,
.form-group textarea {
    flex: 1;
    min-width: 200px;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

/* 考试成绩样式结构 */
.exam-scores {
    margin-bottom: 25px;
}

.exam-type-group {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    border-left: 4px solid #3498db;
}

.exam-type-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    cursor: pointer;
}

.exam-type-header h4 {
    margin: 0;
    color: #2c3e50;
    font-weight: 500;
}

.exam-type-content {
    display: none;
    animation: slideDown 0.3s ease-out;
}

.exam-type-group.expanded .exam-type-content {
    display: block;
}

.subject-scores {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.subject-score-item {
    background-color: white;
    padding: 15px;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 10px;
}

.subject-score-item label {
    display: inline-block;
    color: #34495e;
    font-weight: 500;
    font-size: 14px;
    min-width: 50px;
}

.subject-score-item input[type="number"] {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    text-align: center;
    transition: border-color 0.3s ease;
}

.exam-scores input[type="number"] {
    /* 继承基本输入样式 */
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-group input[type="text"]:focus,
.form-group input[type="number"]:focus,
.form-group input[type="date"]:focus,
.form-group input[type="tel"]:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* 按钮样式 */
.btn {
    padding: 10px 25px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.btn-primary {
    background-color: #3498db;
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
}

.btn-secondary {
    background-color: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
}

.btn-danger {
    background-color: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background-color: #c0392b;
}

.btn-info {
    background-color: #1abc9c;
    color: white;
}

.btn-info:hover {
    background-color: #16a085;
}

/* 搜索栏样式 */
.search-bar {
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.search-bar input,
.search-bar select {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

/* 表格样式 */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    background-color: #f8f9fa;
    font-weight: 500;
    color: #34495e;
}

tr:hover {
    background-color: #f8f9fa;
}

/* 统计卡片样式 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.stat-card {
    background-color: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    text-align: center;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.stat-card h4 {
    color: #7f8c8d;
    margin-bottom: 15px;
    font-weight: 400;
}

.stat-card p {
    font-size: 2.5em;
    font-weight: 300;
    color: #3498db;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow-y: auto;
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 800px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
    position: relative;
}

.close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    cursor: pointer;
    color: #7f8c8d;
}

.close:hover {
    color: #333;
}

/* 详情页面样式 */
.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.detail-item {
    margin-bottom: 15px;
}

.detail-item strong {
    color: #34495e;
    margin-right: 10px;
}

.detail-section {
    margin-top: 30px;
}

.detail-section h4 {
    color: #2c3e50;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ddd;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .form-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .form-group label {
        text-align: left;
        margin-bottom: 8px;
    }
    nav ul {
        flex-direction: column;
    }
    
    .search-bar {
        flex-direction: column;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .detail-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        margin: 10% auto;
        width: 95%;
    }
}

/* 复选框样式优化 */
.form-group input[type="checkbox"] {
    margin-right: 8px;
    transform: scale(1.1);
}

.form-group label:has(input[type="checkbox"]) {
    cursor: pointer;
    padding: 5px 0;
}

.form-group label:has(input[type="checkbox"]):hover {
    color: #3498db;
}

/* 成绩统计样式 */
.form-group > div > div {
    background-color: #f8f9fa;
    padding: 10px;
    border-radius: 4px;
}

.form-group > div > div > label {
    font-weight: 500;
    margin-bottom: 5px;
    display: block;
}

/* 提前批选项样式 */
.early-batch-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    max-width: 400px;
    margin-top: 10px;
}

.early-batch-options label {
    padding: 8px 12px !important;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: flex !important;
    align-items: center;
    background-color: #fff;
    border: 1px solid #e0e0e0;
}

.early-batch-options label:hover {
    background-color: #f8f9fa !important;
    border-color: #3498db;
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.card,
.stat-card {
    animation: fadeIn 0.5s ease-out;
}

/* 表单布局优化 */
@media (min-width: 768px) {
    .form-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
    
    .form-group.full-width {
        grid-column: 1 / -1;
    }
    
    .form-group.full-width label {
        min-width: 120px;
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}